Method and apparatus for diagonal scan and simplified context selection for parallel entropy coding of significance map of transform coefficients

ABSTRACT

A method and apparatus for encoding bit code utilizing context dependency simplification to reduce dependent scans. The method includes retrieving at least one 2 dimensional array of transform coefficient, transforming the at least one 2 dimensional array of transform coefficient to a 1 dimensional coefficient scanning using a diagonal scan in a fixed direction, utilizing the at least one 1 dimensional array of transform coefficients for context selection based on fewer than 11 neighbors, potentially selected based on scan direction, slice type, coding unit type and binarization, and performing arithmetic coding to generate coded bit utilizing context selection and binarization.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application claims benefit of U.S. provisional patent applicationSer. No. 61/388,512, filed Sep. 30, 2010, Ser. No. 61/390,083, filedOct. 5, 2010, Ser. No. number 61/391,907, filed Oct. 11, 2010, Ser. No.61/430,721, filed Jan. 7, 2011, and Ser. No. 61/454,679, filed Mar. 21,2011, which are herein incorporated by reference.

BACKGROUND OF THE INVENTION

1. Field of the Invention

Embodiments of the present invention generally relate to a method andapparatus for diagonal scan in a fixed direction and simplified contextselection for parallel entropy coding of significance map of transformcoefficients.

2. Description of the Related Art

In video coding standards, context modeling is a popular approach usedin entropy coding to improve coding efficiency. Context modelinginvolves selecting a context which determines the probability used toencode binary symbols. The context selection is difficult toparallelize. It is particularly difficult at the decoder when there aretoo many factors that impact the selection, such as, values of otherbinary symbols affecting the context selection. However, suchdependencies tend to provide better coding efficiency. Parallelprocessing is important for high performance, for example, forprocessing throughput, and for reducing power consumption, such as,reducing the frequency requirement or operational voltage.

Therefore, there is a need to improve parallel processing capabilitiesduring entropy coding of transform information, while simultaneouslymaintaining high coding efficiency.

SUMMARY OF THE INVENTION

Embodiments of the present invention relate to a method and apparatusfor a method and apparatus for encoding bit code utilizing contextdependency simplification to reduce dependent scans. The method includesretrieving at least one 2 dimensional array of transform coefficient,transforming the at least one 2 dimensional array of transformcoefficient to a 1 dimensional coefficient scanning using a diagonalscan in a fixed direction, utilizing the at least one 1 dimensionalarray of transform coefficients for context selection based on fewerthan 11 neighbors, potentially selected based on scan direction, slicetype, coding unit type and binarization, and performing arithmeticcoding to generate coded bit utilizing context selection andbinarization.

BRIEF DESCRIPTION OF THE DRAWINGS

So that the manner in which the above recited features of the presentinvention can be understood in detail, a more particular description ofthe invention, briefly summarized above, may be had by reference toembodiments, some of which are illustrated in the appended drawings. Itis to be noted, however, that the appended drawings illustrate onlytypical embodiments of this invention and are therefore not to beconsidered limiting of its scope, for the invention may admit to otherequally effective embodiments.

FIG. 1 is an embodiment of prior art context selection;

FIG. 2 is an embodiment of prior art scan order in zig-zag to map 2dimension array of transform coefficients to 1 dimension array oftransform coefficients;

FIG. 3 is an embodiment of scan order in diagonal scan in fixeddirection to map 2 dimension array of transform coefficients to 1dimension array of transform coefficients.

FIG. 4 shows how diagonal scan aligned with neighboring coefficientpositions, whose values affect the context selection.

FIG. 5 is an embodiment of a context dependency simplification with nodependencies within the same scan reducing dependencies on neighbors indifferent scan lines;

FIG. 6 is an embodiment of a context dependency simplification to reduceneighboring dependency from 11 to 4;

FIG. 7 is an embodiment of context dependency simplification forvertical scan to enable parallel processing within vertical scan line;

FIG. 8 is an embodiment of a context dependency simplification forhorizontal scan to enable parallel processing within horizontal scanline;

FIG. 9 is a flow diagram depicting an embodiment of a method forencoding bit code utilizing the diagonal scan in fixed direction alongwith context dependency simplification to reduce the dependencies toenable parallel context processing;

FIG. 10 is a flow diagram depicting an embodiment of a method fordecoding bit code utilizing the diagonal scan in fixed direction alongwith context dependency simplification to reduce the number ofdependencies to enable parallel context processing;

FIG. 11 is a flow diagram depicting an embodiment of a method forgenerating scan arrays.

DETAILED DESCRIPTION

This disclosure focuses on diagonal scanning of significance map of thetransform coefficients and reducing neighbor dependency during contextselection. This disclosure utilizes the binary symbols that representthe significance map of the transform. The significance map indicatesthe location of the non-zero transform coefficients. For improved codingefficiency, the context selection can depend on the value of thecoefficients in neighboring positions in the transform, typically in theleft, top-left and top directions.

In one embodiment, the transform coefficients and its significance map,indicating the locations of the non-zero coefficients, areencoded/decoded and are provided in 2 dimensional format from thetransform module. In addition, the position of non-zero coefficientsmaybe transmitted in terms of significance map, for example, utilizingsyntax elements: significant_coeff_flag, last_significant_coeff_x,last_significant_coeff_y, etc. Furthermore, coefficients values maybetransmitted, for example, utilizing syntax elements:coeff_abs_level_greater1_flag, coeff_abs_level_greater2_flag,coeff_abs_level_minus3, coeff_sign_flag, etc.

FIG. 1 is an embodiment of prior art context selection for thesignificance map. In FIG. 1, the context for the significant coefficientflag for position X can depend on 11 neighboring positions (A, B, C, D,E, F, G, H, I, J and K). In one embodiment, only one of the G or K willbe required, depending on the direction of the scan. With suchdependency, it is difficult to select the context to decode multiplebins of different positions at the same time. This is especiallydifficult when the traditional approach of zig-zag scan is used, asshown in FIG. 2.

FIG. 2 is an embodiment of dependencies of context selection for map forcoding efficiency with traditional zig-zag orders. If zig-zag scan isused, as shown in FIG. 2, for positions at the edge of the transform,highlighted in grey, the context selection will depend on previouslydecoded position which makes parallel processing difficult. FIG. 2 is anembodiment of prior art scan order to map 2 dimension array of transformcoefficients to 1 dimension array of significance map of the transformcoefficients; scan directions include zig-zag scan, horizontal scan andvertical scan; for zig-zag, scan the direction of the scan line changesat the edge of the 2 dimension array.

For zig-zag scan, the direction of the scan line changes at the edge ofthe 2 dimension array. If zig-zag scan is used, as shown in FIG. 2, forpositions at the edge of the transform, highlighted in blue, the contextselection will depend on previously decoded position which makesparallel processing difficult. FIG. 2 also shows the other scandirections used include vertical and horizontal scans. The solid lineshow the scan line and direction; while the dotted line shows how whenthe scan line reaches the edge of the 2 dimension array, the nextposition is the beginning of the next scan line usually at the oppositeedge (for vertical scan, when the bottom edge is reached by the scanline, the next position is the top edge of the next scan line; forhorizontal scan, when the right edge is reached by the scan line, thenext position is the left edge of the next scan line).

FIG. 3 is an embodiment of dependencies of context selection forsignificant map for improved coding efficiency with different scanningorders. Rather than using the traditional zig-zag scan of FIG. 2, adiagonal scan in a fixed direction approach may be utilized. With adiagonal scan, all scan lines are processed in the same direction(either up-right or down-left) as shown in FIG. 3. The solid line showthe scan line and direction; while the dotted line shows how when thescan line reaches the edge of the 2 dimension array, the next positionis the beginning of the next scan line usually at the opposite edge (forup-right scan, when the top edge is reached by the scan line, the nextposition is the left edge of the next scan line; for down-left scan,when the left edge is reached by the scan line, the next position is thetop edge of the next scan line). Using diagonal scan in fixed directionavoids this dependency at the edges (highlighted in FIG. 2) which occurfor zig-zag scan.

Using diagonal scan in fixed direction avoids this dependency at theedges, highlighted in FIG. 2, which occur for zig-zag scan. A diagonalscan in fixed direction relates to a diagonal scan where the arrow pointto the same direction, i.e. from upper right to lower left, from lowerleft to upper right and the like. In one embodiment, all diagonal scansmaybe in the same direction, all up-right or all down-left. Thedirection of the fixed directional scan may depend on the location ofthe last significant coefficient. Hence, if the position of the lastsignificant coefficient is known, it may be used to select the scandirection. Thus, the diagonals can be processed in parallel and stillsatisfy the top, left, and top-left dependencies, as shown in FIG. 1.

FIG. 3 is an embodiment of scan order (diagonal scan in fixed direction)to map 2 dimension array of significance map of the transformcoefficients to 1 dimension array of significance map of the transformcoefficients; all scan line are processed in the same direction (eitherup-right or down-left); the diagonal scan in fixed direction is used toreplace zig-zag scan in FIG. 2.

FIG. 4 is an embodiment of dependencies of context selection forsignificant map for improved coding efficiency with various types ofscans. In one embodiment, if while processing position X, dependencieson G and K are removed, then this eliminates dependency on previouslydecoded position, which is favorable for parallel processing.Furthermore, context selection for scan line 0 can begin in parallel asthe scans 1, 2, and 3 are being decoded (or processed), assuming thatprocessing of scan 1, 2, and 3 are ahead of scan line 0; removing thedependencies on neighbors in scan lines 1, 2, and 3 enables scan line 0to be processed sooner. FIG. 5 is an embodiment of a context dependencysimplification with such that there are no dependencies within the samescan (removing G and K), and also reducing dependencies on neighborsthat are located on different scan lines;

To avoid dependencies due to context updates, a different set of contextmodels may be used for each scan line, such as, positions on scan 0 mayhave different contexts than position on scan 1 and 2. Note that thediagonals of the proposed fixed direction scan may be processed inparallel.

FIG. 6 is an embodiment of a context dependency simplification to reduceneighboring dependency to less than 11 neighbors (from 11 to 4).Simplification of context selection may also be independent of scanlines. For instance, using context selection, shown in FIG. 6, providesa good trade-off of complexity reduction and good coding gain.

Parallelism may also be achieved within the diagonal by pre-fetchingdata and performing speculative computations. Eliminating G and K, forexample by removing dependency on the other positions within the samescan line, reduces the amount of speculative computation and fetching.The same holds true for vertical and horizontal scans. FIG. 7 is anembodiment of context dependency simplification (removal of B, F, C, G)for vertical scan to enable parallel processing within vertical scanline; while, FIG. 8 is an embodiment of a context dependencysimplification (removal of H, I, J, K) for horizontal scan to enableparallel processing within horizontal scan line. FIG. 7 shows thereduced context dependency to enable easier parallel processing withinthe vertical scan line. FIG. 8 shows the reduced context dependency foreasier parallel processing within horizontal scan lines.

In one embodiment, the characteristics of the significance map vary withslice type or coding unit type. Coding unit type indicates whether thepixel are inter predicted via pixels from other frames and intrapredicted via pixels in the same frame. The context selectiondependencies can be different depending on the slice or coding unittype. For instance, P and B slices, where the residual is small, couldhave much simpler context selection (i.e. less dependency) than I sliceswhich tend to have larger residuals. Thus, not only the context is beingadapted, but also the context selection method based on the slice/codingunit type. In such an embodiment, some slice/coding unit type areenabled to exploit very simple context selection methods.

Therefore, an embodiment may contain any or all of the following:diagonal scanning in fixed direction for of significance map, directionof the scan can depend on the last significant coefficient position,simplified context selection to reduced dependencies while maintainingmost of the coding efficiency, using different sets of context modelsfor adjacent (or all) scans, and/or using different context selectionmethods depending on the slice/coding unit type. As a result, paralleldecoding of various binary symbols in the significance map can occurwhile maintaining high coding efficiency with dependencies in contextselection.

FIG. 9 is a flow diagram depicting an embodiment of a method 900 forencoding bit code utilizing context dependency simplification to reducethe number of dependent scans. The method 900 retrieves 2 dimensionalarray of transform coefficient, which is transformed to a 1 dimensionalcoefficient scanning. The one dimensional array of transformcoefficients is then utilized for context selection and binarization,which are used for arithmetic coding to generate the coded bits.

FIG. 10 is a flow diagram depicting an embodiment of a method 1000 fordecoding bit code utilizing context dependency simplification to reducethe number of dependent scans. The method 1000 retrieves the encodedbits, for example, the encoded bits generated in FIG. 9, to performarithmetic decoding. The arithmetic decoding generates binary symbols,which are utilized in binarization and in context selection. The contextselection are routed back to the arithmetic decoding to generate binarysymbols while maintaining high coding efficiency with dependencies incontext selection. The binarization generates 1 dimensional array oftransform coefficients or syntax elements, which utilized totransforming the 1 dimensional to a 2 dimensional coefficient scanning.Utilizing the two dimensional coefficient scanning generates a 2dimensional transform coefficient.

FIG. 11 is a flow diagram depicting an embodiment of a method 1100 forreducing neighbor dependency in context selection. The method 1100starts at step 1102 and proceeds to step 1104. At step 1104, the method1100 selects one of more neighbors based on scan direction. At step1106, the method 1100 removes neighbors from the scan. At step 1108, themethod 1100 scans through selected neighbors. At step 1110, the method1100 performs context selection. The method 1100 ends at step 1112. Thesteps 1104, 1106 and/or 1108 may look several times and maybe performedin various orders to improve efficiency.

While the foregoing is directed to embodiments of the present invention,other and further embodiments of the invention may be devised withoutdeparting from the basic scope thereof, and the scope thereof isdetermined by the claims that follow.

What is claimed is:
 1. A method of a digital processor for encodingtransform coefficients to bits utilizing context dependencysimplification to reduce dependent scans, comprising: at the digitalprocessor, retrieving at least one 2 dimensional array of thesignificance map of the transform coefficient; transforming the at leastone 2 dimensional array of the significance map of the transformcoefficient to a 1 dimensional coefficient scanning; utilizing the atleast one 1 dimensional array of the significance map of the transformcoefficients for context selection and binarization; and performingarithmetic coding to generate coded bit utilizing context selection andbinarization.
 2. The method of claim 1, wherein the step of transformingthe at least one 2 dimensional array of the significance map of thetransform coefficient to a 1 dimensional coefficient scanning utilizesat least one a diagonal scan in a fixed direction.
 3. The method ofclaim 2 further comprising reducing neighbor dependency to less than 11for context selection.
 4. The method of claim 3, wherein the step ofreducing neighbor dependency comprises at least one of selectingneighbors based on scan direction and removing at least one dependencyneighbor for context selection.
 5. The method of claim 3, wherein thestep of reducing neighbor dependency comprises at least one of selectingneighbors based on at least one of slice type or coding unit type andremoving at least one dependency on neighbors for context selection. 6.The method of claim 3, wherein the step of reducing neighbor dependencycomprises at least one of selecting neighbors based on which scan linethey reside on and removing at least one dependency on neighbors forcontext selection.
 7. The method of claim 2 further comprising reducingneighbor dependency by removing dependency on neighbor in the same scanline for context selection.
 8. The method of digital processor fordecoding transform coefficients from bits with context dependencysimplification to reduce the number of dependent scans, comprising:performing arithmetic decoding on coded bits to generating binarysymbols; utilizing the binary symbols and context selection inbinarization and in context selection, wherein the context selection isutilized in the arithmetic decoding to generate binary symbols whilemaintaining high coding efficiency with dependencies in contextselection; generating at least one 1 dimensional array of at least oneof a significance map of the transform coefficients and syntax elements;transforming the at least one 1 dimensional array to a 2 dimensionalcoefficient scanning; and utilizing the two dimensional coefficientscanning to generate a 2 dimensional transform coefficient.
 9. Themethod of claim 8, wherein the step of transforming the at least one 2dimensional array of the significance map of the transform coefficientto a 1 dimensional coefficient scanning utilizes at least one a diagonalscan in a fixed direction.
 10. The method of claim 9 further comprisingreducing neighbor dependency to less than 11 for context selection. 11.The method of claim 10, wherein the step of reducing neighbor dependencycomprises at least one of selecting neighbors based on scan directionand removing at least one dependency neighbors for context selection.12. The method of claim 11, wherein the step of reducing neighbordependency comprises at least one of selecting neighbors based on on atleast one of slice type or coding unit type and removing at least onedependency on neighbors for context selection.
 13. The method of claim11, wherein the step of reducing neighbor dependency comprises at leastone of selecting neighbors based on which scan line they reside on andremoving at least one dependency on neighbors for context selection. 14.The method of claim 10 further comprising reducing neighbor dependencyby removing dependency on neighbor in the same scan line for contextselection.
 15. A non-transitory computer readable medium comprisingsoftware that, when executed by a processor, causes the processor toperform a method for encoding bit code utilizing context dependencysimplification to reduce dependent scans, the method comprising:retrieving at least one 2 dimensional array of transform coefficient;transforming the at least one 2 dimensional array of transformcoefficient to a 1 dimensional coefficient scanning; utilizing the atleast one 1 dimensional array of transform coefficients for contextselection and binarization; and performing arithmetic coding to generatecoded bit utilizing context selection and binarization.
 16. Thenon-transitory computer readable medium of claim 15, wherein the step oftransforming the at least one 2 dimensional array of the significancemap of the transform coefficient to a 1 dimensional coefficient scanningutilizes at least one a diagonal scan in a fixed direction.
 17. Thenon-transitory computer readable medium of claim 15 further comprisingreducing neighbor dependency to less than 11 for context selection. 18.The non-transitory computer readable medium of claim 17, wherein thestep of reducing neighbor dependency comprises at least one of selectingneighbors based on scan direction and removing at least one dependencyneighbors for context selection.
 19. The non-transitory computerreadable medium of claim 17, wherein the step of reducing neighbordependency comprises at least one of selecting neighbors based on on atleast one of slice type or coding unit type and removing at least onedependency on neighbors for context selection.
 20. The method of claim17, wherein the step of reducing neighbor dependency comprises at leastone of selecting neighbors based on which scan line they reside on andremoving at least one dependency on neighbors for context selection. 21.The non-transitory computer readable medium of claim 16 furthercomprising reducing neighbor for context selection.